<template>
  <div class="component-view">
    <component :is="isKeep"></component>
    <van-button type="info" @click="getKeepTab">切 换</van-button>
  </div>
</template>
<script>
import keepOne from "./children/keepOne.vue";
import keepToo from "./children/keepToo.vue";
import keepThree from "./children/keepThree.vue";
export default {
  components: { keepOne, keepToo, keepThree },
  data() {
    return {
      isKeep: "keepOne",
    };
  },
  methods: {
    getKeepTab() {
      this.isKeep =
        this.isKeep === "keepOne"
          ? "keepToo"
          : this.isKeep === "keepToo"
          ? "keepThree"
          : "keepOne";
    },
  },
};
</script>
<style lang="scss" scoped>
</style>